package com.longe.netty.protobufOne;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * 服务端的 handler
 */
public class NettyProtoBufServerHandler extends SimpleChannelInboundHandler<StudentPOJO.Student> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, StudentPOJO.Student msg) {
        //读取从客户端发送的StudentPojo.Student
        System.err.println("客户端发送的数据 id=" + msg.getId() + " 名字=" + msg.getName());
    }
}
